<?php
/**
 * Interface to be implemented by article managers. This adds an additional level
 * of abstraction between your application, and the actual repository
 * 
 * All changes to articles should happen through this interface.
 */
namespace Inter\ArticleBundle\Model;

interface ArticleManagerInterface
{
	/**
	 * Create empty article instance.
	 * @return ArticleInterface
	 */
	public function createArticle();
	/**
	 * Update an article.  
	 * @param ArticleInterface
	 * @return void 
	 */	
	public function updateArticle(ArticleInterface $article);
	
	/**
	 * Delete an article.
	 * @param ArticleInterface
	 * @return void
	 */
	public function deleteArticle(ArticleInterface $article);
	/**
	 * Returns a collection with all article instances.
	 * @return \Traversable 
	 */
	public function findArticles();
	/**
	 * Return the article's fully qualified class name.
	 * @return string
	 */
	public function getClass();
	/**
	 *  Updates the slugify slug field for a article.
	 *  @param ArticleInterface
	 *  @return void  
	 */
	public function updateSlugField(ArticleInterface $article);
	/**
	 * Find one article by the given criteria
	 * @param array $criteria
	 * @return ArticleInterface
	 */
	public function findArticleBy(array $criteria);
}